\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2}{
\section{Zebulon::MicroStrain::ThreeDMGX2 Class Reference}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2}\index{Zebulon::MicroStrain::ThreeDMGX2@{Zebulon::MicroStrain::ThreeDMGX2}}
}


Interface class for the \hyperlink{namespace_micro_strain}{MicroStrain} 3DM-\/GX2 Orientation Sensor using RS232.  


{\ttfamily \#include $<$threedmgx2.h$>$}\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_1_1_callback}{Callback}
\begin{DoxyCompactList}\small\item\em \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_1_1_callback}{Callback} class to register for messages as the arrive on the serial port. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a98fcf9593a1f4224c3a781fd3598f29d}{
{\bfseries ThreeDMGX2} (const unsigned int maxQueueSize=15)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a98fcf9593a1f4224c3a781fd3598f29d}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad0a276e33bedd6211c5df071968b6391}{
int {\bfseries Initialize} (const std::string \&port, const unsigned int ibaud=115200, const bool tryOtherBauds=true, const unsigned int timout=2000)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad0a276e33bedd6211c5df071968b6391}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_abf0d339a7c8ae0911cb09e58b5906b35}{
int {\bfseries Shutdown} ()}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_abf0d339a7c8ae0911cb09e58b5906b35}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad99fed4cef873d4e18e4e3e947bded77}{
int {\bfseries RegisterCallback} (\hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_1_1_callback}{ThreeDMGX2::Callback} $\ast$cb)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad99fed4cef873d4e18e4e3e947bded77}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a21fb7b031bf80b76083fcbd6f625bea2}{
int {\bfseries RemoveCallback} (\hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_1_1_callback}{ThreeDMGX2::Callback} $\ast$cb)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a21fb7b031bf80b76083fcbd6f625bea2}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ae7698a0c5cd9361edc25405f90ea905c}{
bool {\bfseries IsConnected} () const }
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ae7698a0c5cd9361edc25405f90ea905c}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a24a05d94f7e68eedae2c256b6ec89a48}{
bool {\bfseries SetContinuousMode} (const Message::Type type)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a24a05d94f7e68eedae2c256b6ec89a48}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a63083609f5b6c0636ae6f1e364e08d69}{
bool {\bfseries TransmitMessage} (const CxUtils::Packet message, \hyperlink{class_zebulon_1_1_micro_strain_1_1_message}{MicroStrain::Message} $\ast$$\ast$response, unsigned int timeout=1000)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a63083609f5b6c0636ae6f1e364e08d69}

\end{DoxyCompactItemize}
\subsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a94b651fdd7c10c499849863f61181ab0}{
static void {\bfseries ReceiveThreadFunction} (void $\ast$args)}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a94b651fdd7c10c499849863f61181ab0}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a5d3591d00db0a07a5c6a3610039e563f}{
volatile bool \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a5d3591d00db0a07a5c6a3610039e563f}{mConnectedFlag}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a5d3591d00db0a07a5c6a3610039e563f}

\begin{DoxyCompactList}\small\item\em Flag to indicate a connection has been made. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a4c81ce87080d4591496ee5d37a6fe015}{
CxUtils::Mutex \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a4c81ce87080d4591496ee5d37a6fe015}{mTransmittingMutex}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a4c81ce87080d4591496ee5d37a6fe015}

\begin{DoxyCompactList}\small\item\em Mutex to signal sending data. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad58ace25166094ebfe1ac2a542d184ec}{
CxUtils::Mutex \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad58ace25166094ebfe1ac2a542d184ec}{mMessageQueueMutex}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad58ace25166094ebfe1ac2a542d184ec}

\begin{DoxyCompactList}\small\item\em Mutex for message queue. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_aad1a3e711173d1fbd9386e77961a6371}{
CxUtils::Mutex \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_aad1a3e711173d1fbd9386e77961a6371}{mCallbackMutex}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_aad1a3e711173d1fbd9386e77961a6371}

\begin{DoxyCompactList}\small\item\em Mutex for callbacks. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad69dc31bde79125d92dc9a0ce361414b}{
CxUtils::Thread \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad69dc31bde79125d92dc9a0ce361414b}{mReceiveThread}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad69dc31bde79125d92dc9a0ce361414b}

\begin{DoxyCompactList}\small\item\em Thread for receiving data from sensor. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a42a7b7bc32042658489de933b704b9b0}{
CxUtils::Serial \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a42a7b7bc32042658489de933b704b9b0}{mSerialPort}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a42a7b7bc32042658489de933b704b9b0}

\begin{DoxyCompactList}\small\item\em Serial port interface. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_aac4f338ebcdb1717f685fdfe11d97642}{
Message::Type \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_aac4f338ebcdb1717f685fdfe11d97642}{mContinuousModeType}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_aac4f338ebcdb1717f685fdfe11d97642}

\begin{DoxyCompactList}\small\item\em Type of continuous mode to maintain. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a51ba2ba615763237ddeee443acff2052}{
Message::List \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a51ba2ba615763237ddeee443acff2052}{mMessageQueue}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a51ba2ba615763237ddeee443acff2052}

\begin{DoxyCompactList}\small\item\em All received messages. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a014fa10a893ae9332251cdb402a7399a}{
std::set$<$ \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_1_1_callback}{ThreeDMGX2::Callback} $\ast$ $>$ \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a014fa10a893ae9332251cdb402a7399a}{mCallbacks}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a014fa10a893ae9332251cdb402a7399a}

\begin{DoxyCompactList}\small\item\em Set of callbacks. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a1641222590790360339ce6a26a9e4c4d}{
unsigned int \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a1641222590790360339ce6a26a9e4c4d}{mMaxQueueSize}}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a1641222590790360339ce6a26a9e4c4d}

\begin{DoxyCompactList}\small\item\em Maximum number of messages to store. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad40f099bec4c0c2f19ee0ce186f1e695}{
static const unsigned char {\bfseries GX2Confirm1} = 0xC1}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_ad40f099bec4c0c2f19ee0ce186f1e695}

\item 
\hypertarget{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a7277bad5f96ddc356a27a62967c5f7cb}{
static const unsigned char {\bfseries GX2Confirm2} = 0x29}
\label{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x2_a7277bad5f96ddc356a27a62967c5f7cb}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface class for the \hyperlink{namespace_micro_strain}{MicroStrain} 3DM-\/GX2 Orientation Sensor using RS232. 

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/microstrain/include/microstrain/\hyperlink{threedmgx2_8h}{threedmgx2.h}\end{DoxyCompactItemize}
